<nav class="sidenav navbar navbar-vertical  fixed-left  navbar-expand-xs navbar-light bg-white" id="sidenav-main">
  <div class="scrollbar-inner">
    <!-- Brand -->
    <div class="sidenav-header  align-items-center">
      <a class="navbar-brand" href="/">
        <img src="{{ QEXO_LOGO }}"
             class="navbar-brand-img"
             style="max-height: 2.9rem">
      </a>
    </div>

    <div class="navbar-inner">
      <!-- Collapse -->
      <div class="collapse navbar-collapse" id="sidenav-collapse-main">
        <!-- Nav items -->
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link {% if 'index' in segment %} active {% endif %}" href="/">
              <i class="ni ni-tv-2 text-primary"></i>
              <span class="nav-link-text">主页</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link {% if 'posts' in segment %} active {% endif %}" href="/posts.html">
              <i class="ni ni-single-copy-04 text-orange"></i>
              <span class="nav-link-text">文章</span>
            </a>
          </li>
        <li class="nav-item">
            <a class="nav-link {% if 'pages' in segment %} active {% endif %}" href="/pages.html">
              <i class="ni ni-app text-purple"></i>
              <span class="nav-link-text">页面</span>
            </a>
          </li>
        {% if request.user.is_staff %}
          <li class="nav-item">
            <a class="nav-link {% if 'configs' in segment %} active {% endif %}" href="/configs.html">
              <i class="ni ni-settings-gear-65 text-primary"></i>
              <span class="nav-link-text">配置</span>
            </a>
          </li>
        {% endif %}
          <li class="nav-item">
            <a class="nav-link {% if 'images' in segment %} active {% endif %}" href="/images.html">
              <i class="ni ni-image text-info"></i>
              <span class="nav-link-text">图片</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link {% if 'friends' in segment %} active {% endif %}" href="/friends.html">
              <i class="ni ni-badge text-orange"></i>
              <span class="nav-link-text">友链</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link {% if 'talks' in segment %} active {% endif %}" href="/talks.html">
              <i class="ni ni-chat-round text-purple"></i>
              <span class="nav-link-text">说说</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link {% if 'essay' in segment %} active {% endif %}" href="/essay.html">
              <i class="ni ni-chat-round text-purple"></i>
              <span class="nav-link-text">即刻短文</span>
            </a>
          </li>
        {% if request.user.is_staff %}
          <li class="nav-item">
            <a class="nav-link {% if 'custom' in segment %} active {% endif %}" href="/custom.html">
              <i class="ni ni-archive-2 text-primary"></i>
              <span class="nav-link-text">自定</span>
            </a>
          </li>
        {% endif %}
        </ul>
        <!-- Divider -->
        <hr class="my-3">
        <!-- Heading -->
        <h6 class="navbar-heading p-0 text-muted">
          <span class="docs-normal">资源</span>
        </h6>
        <!-- Navigation -->
        <ul class="navbar-nav mb-md-3">

          <li class="nav-item">
            <a class="nav-link"
               target="_blank"
               href="https://hexo.io/themes/">
              <i class="ni ni-bag-17 text-warning"></i>
              <span class="nav-link-text">主题</span>
            </a>
          </li>

          <li class="nav-item">
            <a class="nav-link"
               target="_blank"
               href="https://hexo.io/plugins/">
              <i class="ni ni-settings text-primary"></i>
              <span class="nav-link-text">插件</span>
            </a>
          </li>

          <li class="nav-item">
            <a class="nav-link"
               target="_blank"
               href="https://www.github.com/am-abudu/Qexo">
              <i class="ni ni-send text-info"></i>
              <span class="nav-link-text">文档</span>
            </a>
          </li>
        </ul>
      </div>
    </div>
  </div>
</nav>